Computer Architecture


Objectives : Student should be able to -


Q1. a)  Describe  CPU  (Central Processing Unit).

CPU_2

⇒  CPU is the brain of the computer, made up of Integrated circuit build inside a silicon chip called Microprocessor.

⇒  The CPU is made up of three main components, the Control unit, the Immediate access memory, and the Arithmetic Logic unit (ALU).

⇒  The Control unit controls the flow of data between different components using Address-bus, Data-bus and Control-bus; regulates and integrates the operation of the computer.

⇒  The Immediate access memory is where the CPU holds all the data and programs that it is currently using.

⇒  The Arithmetic logic unit (ALU) is where the CPU performs all arithmetic and logic operations.

⇒  CPU is responsible for the execution of all instructions and processing data.

b)  Explain the  purpose of CPU .

The purpose of CPU is to process data and execute all instructions.

Perform basic arithmetic calculation and logic operations.

Control all the components of computer and perform input/output (I/O) operations specified by the instructions in the program.

Fetch each instruction from main memory RAM, decode and execute it sequentially.

c)  What is meant by  Word size  of CPU ?

⇒  The Word size refers to the number of bits a CPU can process at a time. (like 8-bits, 16-bit, 32-bit, 64-bit..)

⇒  The bigger the word size, the better the CPU's performance will be.

CPU_2

d)  Describe  System Clock  and  Clock cycle or speed. 

⇒  System Clock is an internal clock within the CPU that regulates the timing and speed of execution of instructions, and synchronizes all computer operations.

⇒  Clock cycle or speed refers to the number of cycles or instructions a CPU can execute per second.

⇒  It is measured in MHz (Mega Hertz - 1 million cycles per second) or GHz (Giga Hertz - 1 billion cycles per second).

Note : The clock speed can be changed by altering the BIOS settings. By increasing clock speed, the processing speed of the computer is increased.

But using a clock speed higher than the computer was designed for can lead to problems, like – overheating of CPU, unsynchronized operations and system crash called  Overclocking .

e)  Describe  Computer Register. 

⇒  A Register is a data holding place build inside the CPU, extremely faster than main memory RAM.

⇒  Registers are of two types, general purpose and special purpose register.

⇒  General purpose register is discrete memory locations within CPU, used to hold data and instruction temporarily which are currently in execution.

⇒  Special purpose register that has a specific data handling task to carry out.

f)  Give the difference between  Cache  and  RAM  memory.

⇒  Cache memory is build inside the CPU extremely faster than main memory RAM.

⇒  Cache memory uses SRAM technology, while RAM uses DRAM technology in general.

⇒  Cache memory stores frequently used instructions and data that need to be accessed faster.

⇒  When a CPU wishes to read memory, it will first check out the cache and then move to main memory RAM if the required data isn't there.

⇒  The larger the cache memory size the better the CPU performance.

g)  Describe  Core  of the processor.

⇒  Core refers to the number of Processing units (CPU) built inside a single Microprocessor.

⇒  Each Processing unit has its own Control Unit, ALU, Cache and Registers which can perform all its tasks independently.

⇒  Dual-core processor contains two CPUs, giving twice the performance of the normal computer. It can process two instructions simultaneously.

⇒  Quad-core processor contains four CPUs, which divides data for processing by four units.

⇒  Multiple cores allow PCs to run multiple processes at the same time with greater ease, increasing its performance.

Q2. a)  Describe what you mean by computer term  System Bus. 

⇒  System Bus is a pathway that carries data using parallel transmission between major components of a computer system.

⇒  Bus width refers to the number of bits it carries in parallel simultaneously at a time. The common data bus widths include 8 bit, 16 bit, 32 bit and 64 bit.

⇒  The wider the bus width, faster would be the data flow on the bus and thus better system performance.

Note : In general, Bus is a data transferring channels used to transfer data using either serial or parallel transmission between various components of the computer system.

b)  Describe the following  Buses  used by CPU for communicating with other devices within the computer.

✬   Address Bus : 

⇒  Address Bus carries memory location address throughout the computer system, in order to either read data from, or write data to, that memory location.

⇒  Between CPU and main memory (RAM), it is uni-directional (from CPU to main memory only).

⇒  The width of the address bus determines how many unique memory loactions can be addressed at a time simultaneously.

Example : A bus of width 8-bit can convey 28 = 256 different addresses.
  (so, it can address)     = 256 bytes of memory.
  A bus of width 16-bit can address 216 = 65536 / 1024
    = 64 KB of memory.
  A bus of width 32-bit can address 232 = 4294967296 / (1024 x 1024 x 1024)
    = 4 GB of memory.

⇒  The wider the bus, the more memory a computer can use.

Note : The width of the address bus determines the size of the memory that the computer can use.

✬   Data Bus : 

⇒  Data Bus is bi-directional, that allows data to be sent in both direction between CPU and computer memory or input/output devices.

⇒  The width of the data bus determines the how many bits of data (i.e. word length) that can be transported at a time.

⇒  The wider the bus, the larger the word-length a computer can transport.

Example : A bus of width 8-bit can transfer 28 = 1 byte of data per read/write cycle.
  A bus of width 16-bit can transfer 216 = 2 bytes of data per read/write cycle.
  A bus of width 32-bit can transfer 232 = 4 bytes of data per read/write cycle.

✬   Control Bus : 

⇒  Control Bus is bi-directional, that carries control signals from Control Unit of CPU to other components and devices connected to the computer. The devices also communicate with CPU using control bus.

⇒  The examples of control signals are, memory read/write signals, device interrupt signal and status signals.

⇒  The control bus also carries the clock's pulses of system clock needed to synchronize all the operations of computer.

⇒  It is usually 8-bit wide. Since it only carries the control signals, width of the control bus do not affect the performance of CPU.

System bus

Q3. State four  factors that determines the performance of CPU .

A computer’s performance can be increased by -

  1. increasing the Clock speed.
  2. the use of multi-core microprocessor.
  3. increasing the size of Cache memories.
  4. increasing the Word size (i.e. increase the width of Address Bus and Data Bus).

Q4. What is processor  Instruction set .

⇒  A CPU has its own Instruction set, a set of low-level instructions that instructs the CPU how to carry out an operation.

⇒  Each instruction is made up of Opcode (Operation code) and an Operand.

⇒  The Opcode informs the CPU what operation needs to be done.

⇒  And Operands are subjects of the operation, such as data values, registers, or memory addresses.

  Instruction Comment
Example : Opcode Operand
  MOVE Y,   A Y ← A
  SUB Y,  B Y ← Y - B
  MOVE T,  D T ← D
  MPY T,  E T ← T x E
  ADD T,  C T ← T + E
  DIV Y,  T Y ← Y ÷ T
  LOAD D Acc ←D
  MPY E Acc ←Acc x E
  STOR Y Y ←Acc

►   Von Neumann Architecture

Q1. a)  Describe  Von Neumann Architecture  of Computer.

⇒  The Von Neumann architecture is a design model for a stored-program digital computer.

⇒  It stores both program and data in the same read-write memory, accessible by its location.

⇒  The CPU fetches instruction from main memory RAM, decode and execute it sequentially called Fetch-execute cycle.

⇒  Its Central Processing Unit (CPU) consists of Memory Unit (Registers), Control unit and Arithmetic Logic unit for processing.

b)  Describe  Fetch execute cycle. 

⇒  The Fetch-Execute Cycle is a standard cyclic method of processing data by the CPU.

⇒  CPU fetches a single program instruction or data from main memory (RAM) and store them in suitable register.

⇒  Determines what CPU has to do by decoding the instruction and carries out those action sequentially.

⇒  This cycle is repeated continuously by the CPU, from boot-up to when the computer is shut down.

c)  What are the main  advantages  of Von Neumann Architecture.

⇒  Stores both program and data in the same memory accessible by its location, so no need to have two separate memory.

⇒  No need to have two separate processor to process program and data separately in parallel.

Von Neumann Architecture

Q2.  Describe different  stages that takes place during  “Fetch-Decode-Execute Cycle”. 

  1. The Program Counter (PC) contains the address of the next instruction to be fetched.
  2. The address stored in the Program Counter (PC) is then transferred to Memory Address Register (MAR).
  3. The CPU fetches the data or instruction from main memory and loads it in MDR using address in MAR.
  4. The data or instruction from MDR is then transferred to Current Instruction Register (CIR).
  5. The value in (PC) Program Counter is incremented by 1 so that the CPU gets ready for the next instruction which has to be fetched.
  6. Finally the instruction is decodes and executes by passing the control signals to the appropriate components of the computer system.
  7. This process continues from boot-up to when the computer is shut down.
Fetch Execute Cycle

Q3. State the function of the following  Special Purpose Registers.  build inside CPU.

Program Counter (PC) : An incrementing counter that keeps track of the memory address from where the instruction is to be fetched next.
Memory Address Register (MAR) : Holds the address of the memory location that need to be accessed now.
Memory Data / Buffer Register (MDR / MBR) : Holds the content of memory location contained in MAR, that is being transferred to or from the main memory.
Current Instruction Register (CIR) : Holds the currently fetched instruction while it is decoded and executed.
Arithmetic Logical Unit (ALU) : Performs mathematical and logical operations. The register where the data processing is carried out.
Accumulator (Acc) : A temporary data holding place that stores intermediate arithmetic and logical results.

Q4. Give the functions of the following  'Units’ build inside CPU. 

✬   Control Unit : 

⇒  It directs the flow of data between CPU and other components of the computer system.

⇒  It sends control signal to control and coordinates the computer activities.

⇒  It fetches each instruction from main memory (RAM), decode and execute it sequentially.

⇒  It tells the computer memory, ALU and Input/Output devices, how to respond to the instruction send by the processor.

✬   ALU (Arithmetic Logic Unit) : 

⇒  Performs mathematical (add, subtract etc.) and logical (AND, OR, NOT etc.) operations.

⇒  The unit where the data processing is carried out.

⇒  It temporarily holds the result of calculation in a register called Accumulator.

✬   Memory Unit : 

⇒  MAR (Memory Address Register) and MDR (Memory Data Register) are two registers used by this unit.

⇒  It stores memory location address in MAR and its content in MDR just before passing it to CIR, and other registers within CPU and primary memory RAM.

Q5.  Describe  Cache  memory.

⇒  Cache is a very high-speed temporary memory, built using SRAM technology, placed between RAM and CPU.

⇒  It increases the CPU performance by holding frequently requested data and instruction for immediate use by CPU.

⇒  It is used to speed up and synchronize the main memory RAM with high-speed CPU.

⇒  When the CPU need to read memory, it will first check out the cache and then move to main memory RAM if the required data isn't there.

⇒  It is costlier than main memory RAM but economical that CPU registers.

Note : Cache means any area of storage used to quickly access frequently used data, other examples include web-cache, database cache, DNS cache, etc.

Q6.  A section of computer memory is shown below:

Address Content
1000 0000 0110 1110
1000 0001 0101 0001
1000 0010 1000 1101
1000 0011 1000 1100
arrow continues arrow continues
1000 1100  
1000 1110  

a)  The contents of memory location 1000 0001 are to be read.

Show the contents of the MAR and the MDR during this read operation :

MAR
1
0
0
0
0
0
0
1
                 
MDR
0
1
0
1
0
0
0
1

b)  The 0111 1001 is to be written into memory location 1000 1110.

Show the contents of the MAR and the MDR during this write operation :

MAR
1
0
0
0
1
1
1
0
                 
MDR
0
1
1
1
1
0
0
1

c)  Show any changes to the computer memory following the read and write operations in part (a) and part (b).

Address Content
1000 0000 0110 1110
1000 0001 0101 0001
1000 0010 1000 1101
1000 0011 1000 1100
arrow continues arrow continues
1000 1100  
1000 1110 0111 1001

Q7.  The Laptop has central processing unit (CPU) that performs the fetch-decode-execute cycle using several components, including the memory data register (MDR) and the arithmetic logic unit (ALU).

Describe how the MDR and the ALU are used in fetch-decode-execute cycle.

⇒  Data from main memory RAM is fetched and stored in MDR.

⇒  Data from MDR is sent to ALU to be processed.

⇒  ALU performs mathematical calculation and logical operation on the data.

⇒  ALU has an in-built register called Accumulator where the intermediate result of the calculation is stored.

⇒  After calculation, ALU sends data to MDR from where it is sent back to the RAM.

►   Embedded systems

Q1. a)  Describe what is meant by  Embedded system  with example.

⇒  An embedded system is a microcontroller or microprocessor based hardware system with embedded software designed to do only some specific tasks.

⇒  It is capable of performing its task either independently, or by being a part of a large system.

⇒  Embedded software is called firmware, which are stored in ROM that tells the microcontroller how to respond to the data provided to it.

Example :
  • Electronic Calculator.
  • Digital Watch.
  • Domestic home appliances, like TV, Electric Oven, Dishwasher, Home Theater (Sound system), etc.
  • ATM and Vending machines.
  • Central heating systems
  • Engine management system in vehicles.
  • GPS System.

b)  Embedded system could use either Microprocessor or Micro-controller.

Give difference between  Microprocessor  and  Micro-controller. 

⇒  Microprocessor contains only processing unit or CPU, it needs extra hardware chips like ROM and RAM fixed in mother-board with different I/O ports for peripheral devices. It is powerful and complex, used for general purpose computing.

⇒  Microcontroller contains a set of processing unit, ROM, RAM and I/O ports all integrated into a single chip. It can be used stand-alone.

c)  Explain,  how an Embedded System works .

⇒  It takes the analogue/digital input, automatically from sensors or by user through suitable input devices and send it to the microcontroller.

⇒  ADC (Analogue to Digital Converter) is used to convert sensor's analogue data to digital.

⇒  Embedded software tells the microcontroller how to respond to the data provided to it, manage output devices to produce expected result.

⇒  DAC (Digital to Analogue Converter) is used to convert digital data into analogue signals for Actuators to do some mechanical work if needed.

Embedded system

d)  State four of the  features  you would expect to find in any embedded system.

  1. Performs one or very few dedicated tasks.
  2. Uses embedded software, don't need any operating system.
  3. Embedded systems cannot be changed or upgraded by the user.
  4. It could perform its task either independently or by being a part of a large device/system.
  5. Built to do the same task, repeatedly or continuously with little or no human intervention.
    Example : A fully automatic washing machine works on its own after the programme is set and stops once the task is over.
  6. Perform the task within a certain time frame. Example : A car’s brake system, if exceeds the time limit, may cause accidents.
  7. They are small sized, consume less power and are not too expensive.
Characteristics of Embedded Systems

Q2.  Describe three  applications  that use embedded systems.

1. Household Appliances Example - Home Security system, Setup Box, Digital Camera, Television, Microwave Oven, Air conditioning, Refrigerator and much more.
2. Electronic devices at Offices / Network Communication Example - Printer, Photocopy machine, Router, Modem, etc.
3. Healthcare (medical equipments) Example - Heartbeat monitors, Tele-supervision, CT/MRI Scanners, Ventilators, etc.
4. Automobiles Example - Anti-lock Braking System (ABS), Air conditioning control, Ignition control, Airbag control, Rain sensing wipers, etc.
5. Industrial applications Example - Robots, 3D Printing machines, 3D Cutters, Security system, etc.
6. Aerospace and Defense Example - Flight Control system, Navigation system, Air and Thermal Managemet, etc.

Q3.  Give  benefits  and  drawbacks  of using embedded systems.

  Benefits :
  1. They are small in size and therefore easy to fit into devices.
  2. They are cheap (low cost) to make.
  3. They consume very little power.
  4. Usually dedicated to one or very few tasks with simple interfaces. Often don't require any Operating System.
  5. They are convenient for mass production with low output cost.
  Drawbacks :
  1. Once configured, these systems cannot be changed.
  2. Troubleshooting is difficult for embedded systems.
  3. Due to the difficulty in upgrading and fault finding, devices are often just thrown away rather than being repaired.
  4. Hardware capability is limited, because they are made to do some specific tasks.

Q4.  A Camera uses an embedded system.

a)  Name three of the tasks controlled by the embedded system in the digital camera.

  1. Operate the flash automatically.
  2. Focus the image automatically.
  3. Adjust the shutter speed automatically.
  4. Adjust the aperture size automatically.

b)  Name two applications where digital camera could be used.

  1. Photography and Video shoots for personal use.
    (Take pictures or videos, check instantly and retake if necessary. Store it in solid state memory for later use)
  2. Verify the identity of passenger at airport.
    (Take picture of the passanger and compare it with scanned image or image stored in database)
  3. Webcamera for Video conferencing over internet.
  4. CCTV camera or Security camera for Surveillance purpose.
  5. Produce 360 degree image of the surrounding for Virtual Reality.
  6. Produce 3D image of an object.

Q5.  A games console is controlled by an embedded system in the form of a microcontroller. New games are supplied on a memory stick or via an internet connection. Various devices, such as a steering wheel, are connected to the console.

a)  Describe the inputs needed by the embedded system and describe what outputs you would expect to be produced.

⇒  Game console receives input about the position and movement of the object from sensors and receives commands from player through input device like steering wheel, by push of a button or twist of the control stick (or joystick).

⇒  Embedded Accelerometers measures acceleration and deceleration and respond to the twist of control stick to move a character or object forward/backward and side to side.

⇒  Proximity sensors used in smart touch pads with electrodes (control stick) can detect the movement of hand/finger to select and interact with the character or objects on screen.

⇒  Embedded accelerometers and proximity sensors together with microcontroller in game console allows human to interact with game; simulate real time events to give immersive games experience.

b)  Updates to the internal software in the games console are required every six months. Explain how the device software is updated without the need to send the games console back to the manufacturer every six months.

⇒  Embedded systems can be connected to the internet and the latest version of the device software could be updated from manufacturer's website automatically.

⇒  Automatic updates could also received by plugging the device into a computer and update the software over its internet connection via cellular network, WiFi or Bluetooth.

⇒  New games could be downloaded and stored in the device SSD memory from the website.

⇒  The player can play new games by inserting the memory stick in the games console, load it into its main memory (RAM) and execute it by its microcontroller.


REVISION : Statements and its key computing terms.

Central Processing Unit (CPU) responsible for the execution or processing of all the instructions and data in a computer.
Integrated Circuit usually a chip made from a semi-conductor material which carries out the same tasks as larger circuit made from individual components.
Von Neumann architecture a type of computer architecture which introduced the concept of the stored program in the 1940s
Arithmetic & Logic Unit (ALU) the component of the CPU that carries out all arithmetic and logical operations.
Accumulator (Acc) temporary general purpose register that stores numberical values at any part of a given operation.
Memory Address Register (MAR) a register that stores the address of the memory location currently being read from or written to.
Current Instruction Register (CIR) a register that stores the current instruction being decoded and executed.
Memory Data Register (MDR) a register that stores data that has just been read from memory or data that is about to be written to memory.
Program Counter (PC) a register that stores the address where the next instruction to be read can be found.
Control Unit the component of a computer's CPU that ensures synchronisation of data flow and programs throughout the computer by sending out control signals along the control bus.
System Clock produces timing signals on the control bus to ensure synchronisation takes place.
Clock cycle clock speeds are measured in terms of GHz; this is the vibrational frequency of the system clock which sends out pulses along the control bus; for example, a 3.5 GHz clock cycle means 3.5 billion clock cycles a second.
Immediate Access Store (IAS) memory that holds all data and programs needed to be accessed by the control unit.
Backing store a secondary storage device (such as HDD or SSD) used to store data permanently even when the computer is powered down.
Cache is temporary memory using static RAM to hold frequently used data/instructions by the CPU thereby increasing CPU performance.
More generally, cache means any area of storage used to quickly access frequently used data - other examples include web cache, database cache, DNS cahe.
Register a temporary component in the CPU which can be general or specific in its use; it holds data or instructions as part of the Fetch-Decode-Execute cycle.
Address a label for a memory location used by the CPU to track data.
Memory location a numbered place in memory where values can be stored.
System buses a connection between major components in a computer that can carry data, addresses or control signals.
Address bus the system bus that carries the addresses throughout the computer system.
Data bus the system bus that allows data to be carried from CPU to memory (and vice versa) or to and from input/output devices.
Control bus the system bus that carries signals from control unit to all other computer components.
Word a group of bits used by a computer to represent a single unit; for example, modern computers often use 64-bit word length.
Over Clocking changing the clock speed of a system clock to a value higher than the factory / recommended setting.
Core a unit on a CPU made up of an ALU, Control Unit and Registers; a CPU may contain a number of Cores. Example -
Dual Core - a CPU containing two Cores.
Quad Core - a CPU containing four Cores.
Fetch-Execute- Decode cycle a cycle in which instructions and data are fetched from memory, decoded and finally executed.
Opcode a part of a machine code instruction that indentifies what action the CPU has to perform.
Operand a part of a machine code instruction that identifies what data is to be used.
Instruction set the complete set of machine code instructions used by a particular microprocessor.
Embedded System a combination of hardware and software designed to carry out a specific set of functions.



Number of views : 701
* * * * * * * * *
* * * * * *
* * *
*